<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>派车单管理</title>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
	<meta name="decorator" content="ani"/>
	<%@ include file="/webpage/include/bootstraptable.jsp"%>
	<%@include file="/webpage/include/treeview.jsp" %>
	<%@include file="dispatchingList.js" %>
</head>
<body>
	<div class="wrapper wrapper-content">
	<div class="panel panel-primary">
	<div class="panel-heading">
		<h3 class="panel-title">派车单列表</h3>
	</div>
	<div class="panel-body">
		<sys:message content="${message}"/>
	
	<!-- 搜索 -->
	<div class="accordion-group">
	<div id="collapseTwo" class="accordion-body collapse">
		<div class="accordion-inner">
			<form:form id="searchForm" modelAttribute="dispatching" class="form form-horizontal well clearfix">
				　<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="状态：">预付款：</label>
				<select class="form-control" name="yfk" >
					<option value="" >请选择</option>
					<option value="未支付">未支付</option>
					<option value="已支付">已支付</option>
				</select>

				</div>
				　<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="状态：">回执结算：</label>
				<select class="form-control" name="hz" >
					<option value="" >请选择</option>
					<option value="已配载">未支付</option>
					<option value="预支付">预支付</option>
					<option value="已支付">已支付</option>
				</select>

				</div>
				<%--　<div class="col-xs-6 col-sm-3 col-md-2">--%>
				<%--<label class="label-item single-overflow pull-left" title="状态：">投保状态：</label>--%>
				<%--<select class="form-control" name="bx" >--%>
				<%--<option value="" >请选择</option>--%>
				<%--<option value="未投保">未投保</option>--%>
				<%--<option value="已投保">已投保</option>--%>
				<%--</select>--%>

				<%--</div>--%>

				　<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="派车单号：">派车单号：</label>
				<form:input path="pcdh" htmlEscape="false" maxlength="64"  class=" form-control"/>
				</div>
				　<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="合同号：">合同号：</label>
				<form:input path="hth" htmlEscape="false" maxlength="64"  class=" form-control"/>
				</div>

				　<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="车牌号：">车牌号：</label>
				<form:input path="cph" htmlEscape="false" maxlength="64"  class=" form-control"/>
				</div>
				　
				　<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="司机姓名：">司机姓名：</label>
				<form:input path="sjxm" htmlEscape="false" maxlength="64"  class=" form-control"/>
				</div>


		  <div class="col-xs-12 col-sm-6 col-md-4">
			<div style="margin-top:26px">
			  <a  id="search" class="btn btn-primary btn-rounded  btn-bordered btn-sm"><i class="fa fa-search"></i> 查询</a>
			  <a  id="reset" class="btn btn-primary btn-rounded  btn-bordered btn-sm" ><i class="fa fa-refresh"></i> 重置</a>
			 </div>
	    </div>	
	</form:form>
	</div>
	</div>
	</div>
	
	<!-- 工具栏 -->
	<div id="toolbar">
		<button id="jf1" class="btn btn-success" disabled onclick="yfkqr1()">
			预付款确认
		</button>

		<button id="hz" class="btn btn-primary" disabled onclick="hzfknew()">
			回执结算(含货到)
		</button>
		<button id="hz1" class="btn btn-success" disabled onclick="hzqrnew()">
			回执确认
		</button>
	        	<a class="accordion-toggle btn btn-default" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
					<i class="fa fa-search"></i> 检索
				</a>
		    </div>
		
	<!-- 表格 -->
	<table id="dispatchingTable" class="table text-nowrap"  data-toolbar="#toolbar"></table>

    <!-- context menu -->
    <%--<ul id="context-menu" class="dropdown-menu">--%>
    	<%--<shiro:hasPermission name="tms:dispatching:edit">--%>
        <%--<li data-item="edit"><a>编辑</a></li>--%>
        <%--</shiro:hasPermission>--%>
        <%--<shiro:hasPermission name="tms:dispatching:del">--%>
        <%--<li data-item="delete"><a>删除</a></li>--%>
        <%--</shiro:hasPermission>--%>
        <%--<li data-item="action1"><a>取消</a></li>--%>
    <%--</ul>  --%>
	</div>
	</div>
	</div>
	<div class="modal fade" id="hzqr" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog" style="width:1100px">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title" >回执结算确认</h4>
				</div>
				<div class="modal-body">
					<table class="table table-bordered">
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="收款人"/></td>
							<td><input id="skr4" readonly="readonly" class="form-control "/></td>

							<td width="15%"><input readonly="readonly"class="form-control " value="卡号"/></td>
							<td><input id="kh4" readonly="readonly" class="form-control "/></td>

							<td width="15%"><input readonly="readonly"class="form-control " value="开户行"/></td>
							<td><input id="khh4" readonly="readonly" class="form-control "/></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="货到付款金额"/></td>
							<td><input id="hdfk4" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="货到付款现金"/></td>
							<td><input id="hdfkxj4" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="货到付款油卡"/></td>
							<td><input id="hdfkyk4" readonly="readonly" class="form-control "/></td>

						</tr>
						<tr>

							<td width="15%">实付货到现金</td>
							<td><input id="sfhdxj4" onblur="js()"  class="form-control required number"/></td>
							<td width="15%">实付货到油卡</td>
							<td><input id="sfhdyk4" onblur="js()"  class="form-control required number"/></td>
							<td width="15%">油卡卡号</td>
							<td>
								<select  id="code44"   class="form-control ">

								</select></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="回执金额"/></td>
							<td><input id="hzht4" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="回执现金"/></td>
							<td><input id="hzxj4" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="回执油卡"/></td>
							<td><input id="hzyk4" readonly="readonly" class="form-control "/></td>
						</tr>
						<tr>
							<td width="15%">实付回执现金</td>
							<td><input id="xj4" onblur="js()" class="form-control required number"/></td>
							<td width="15%">实付回执油卡</td>
							<td><input id="yk4" onblur="js()" class="form-control required number"/></td>
							<td width="15%">油卡卡号</td>
							<td>
								<select  id="code4"   class="form-control ">

								</select></td>
							<%--<input id="code"  class="form-control"/></td>--%>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="实付回执金额"/></td>
							<td><input id="hzzje4" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="实付货到金额"/></td>
							<td><input id="sfzje4" readonly="readonly" class="form-control "/></td>
							<td width="15%">增减说明</td>
							<td><input id="remark4"  class="form-control required"/></td>

						</tr>
					</table>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" onclick="qx4()">作废</button>
					<button type="button" class="btn btn-primary" onclick="qd4()">确定</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal -->
	</div>
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog" style="width:1100px">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">回执结算</h4>
				</div>
				<div class="modal-body">
					<table class="table table-bordered">
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="收款人"/></td>
							<td><input id="skr" readonly="readonly" class="form-control "/></td>

							<td width="15%"><input readonly="readonly"class="form-control " value="卡号"/></td>
							<td><input id="kh" readonly="readonly" class="form-control "/></td>

							<td width="15%"><input readonly="readonly"class="form-control " value="开户行"/></td>
							<td><input id="khh" readonly="readonly" class="form-control "/></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="货到付款金额"/></td>
							<td><input id="hdfk" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="货到付款现金"/></td>
							<td><input id="hdfkxj" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="货到付款油卡"/></td>
							<td><input id="hdfkyk" readonly="readonly" class="form-control "/></td>

						</tr>
						<tr>

							<td width="15%">实付货到现金</td>
							<td><input id="sfhdxj" onblur="js()"  class="form-control required number"/></td>
							<td width="15%">实付货到油卡</td>
							<td><input id="sfhdyk" onblur="js()"  class="form-control required number"/></td>
							<td width="15%">油卡卡号</td>
							<td>
								<select  id="code11"   class="form-control ">

								</select></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="回执金额"/></td>
							<td><input id="hzht" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="回执现金"/></td>
							<td><input id="hzxj" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="回执油卡"/></td>
							<td><input id="hzyk" readonly="readonly" class="form-control "/></td>
						</tr>
						<tr>
							<td width="15%">实付回执现金</td>
							<td><input id="xj" onblur="js()" class="form-control required number"/></td>
							<td width="15%">实付回执油卡</td>
							<td><input id="yk" onblur="js()" class="form-control required number"/></td>
							<td width="15%">油卡卡号</td>
							<td>
								<select  id="code1"   class="form-control ">

								</select></td>
							<%--<input id="code"  class="form-control"/></td>--%>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="实付回执金额"/></td>
							<td><input id="hzzje" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="实付货到金额"/></td>
							<td><input id="sfzje2" readonly="readonly" class="form-control "/></td>
							<td width="15%">增减说明</td>
							<td><input id="remark"  class="form-control required"/></td>

						</tr>
						<script>
                            function js() {
                                var yk= $("#yk").val();
                                var xj= $("#xj").val();
                                var hdyk= $("#sfhdyk").val();
                                var hdxj= $("#sfhdxj").val();

                                if(yk==""){
                                    yk="0"
                                }
                                if(xj==""){
                                    xj="0"
                                }
                                if(hdyk==""){
                                    hdyk="0"
                                }
                                if(hdxj==""){
                                    hdxj="0"
                                }
                                var zje=parseFloat(xj)+parseFloat(yk);
                                $("#hzzje").val(zje);
                                var zje1=parseFloat(hdxj)+parseFloat(hdyk);
                                $("#sfzje2").val(zje1);
                            }

						</script>

					</table>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
					<button type="button" class="btn btn-primary" onclick="qd6()">确定</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal -->
	</div>
	<div class="modal fade" id="myModa2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog" style="width:1100px">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title">预付款</h4>
				</div>
				<div class="modal-body">
					<table class="table table-bordered">
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="收款人"/></td>
							<td><input id="skr1" readonly="readonly" class="form-control "/></td>

							<td width="15%"><input readonly="readonly"class="form-control " value="卡号"/></td>
							<td><input id="kh1" readonly="readonly" class="form-control "/></td>

							<td width="15%"><input readonly="readonly"class="form-control " value="开户行"/></td>
							<td><input id="khh1" readonly="readonly" class="form-control "/></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="预付现金"/></td>
							<td><input id="yfxj" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="预付油卡"/></td>
							<td><input id="yfyk" readonly="readonly" class="form-control "/></td>
							<td width="15%"><input readonly="readonly"class="form-control " value="预付总金额"/></td>
							<td><input id="yfzje" readonly="readonly" class="form-control "/></td>
						</tr>
						<tr>
							<td width="15%"><input readonly="readonly"class="form-control " value="油卡卡号"/></td>
							<td width="85%" colspan="5"> <input id="ykkh" readonly="readonly" class="form-control "/></td>

						</tr>

					</table>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
					<button type="button" class="btn btn-primary" onclick="yfkqd()">确定</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal -->
	</div>

</body>

</html>